-- GENERATED SPELL FOR [Twilight Disciple] --


function spell0_2338(pUnit, Event) --@Heal,Heal--
pUnit:FullCastSpellOnTarget(2054,pUnit)
pUnit:RegisterEvent('Sorts_2338', 3000, 1)
end

function spell1_2338(pUnit, Event) --@Renew,n/a--
pUnit:FullCastSpellOnTarget(6074,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2338', 15000, 1)
end

function Sorts_2338(pUnit, Event)
local choix_sorts_2338 = math.random(0, 1)
if choix_sorts_2338 == 0 then
pUnit:RegisterEvent('spell0_2338', 1, 1)
end
if choix_sorts_2338 == 1 then
pUnit:RegisterEvent('spell1_2338', 1, 1)
end
end

function mob2338_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2338', math.random(1500, 3000), 1)
end

function mob2338_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2338_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2338_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2338, 1, 'mob2338_Action')
RegisterUnitEvent(2338, 2, 'mob2338_Leave')
RegisterUnitEvent(2338, 3, 'mob2338_Kill')
RegisterUnitEvent(2338, 4, 'mob2338_Die')
